﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Xml.Linq;

namespace MontagsmalerApp.Views
{
	/// <summary>
	/// Interaktionslogik für BegriffeWindow.xaml
	/// </summary>
	public partial class BegriffeWindow : Window
	{
		public BegriffeWindow()
		{
			InitializeComponent();

			var xDoc = XDocument.Load(@"..\..\Begriffe.xml").Root;
			dataGridBegriffe.DataContext = xDoc;
		}

    private void Window_Loaded(object sender, RoutedEventArgs e)
    {
      dataGridBegriffe.Columns[1].Header = "Begriffe (" + dataGridBegriffe.Items.Count + ")";
    }

    private void dataGridBegriffe_LoadingRow(object sender, DataGridRowEventArgs e)
    {
      e.Row.Header = e.Row.GetIndex() + 1;
    }
	}
}
